<include file="Public:head" />
<style>
        .radial{
            background: -webkit-gradient(radial, 0 0, 0, 1500 900, 2000, from(#fff), to(#ccc));
            border-radius: 5px;
            box-shadow: 10px 10px 10px 2px #ccc;
        }
        .table td{
            text-align: center;
        }

    </style>
    <!-- 分页什么的 -->
    <!-- 进度条 -->
    <!-- 标签页+ -->
    <br><br><br>


    
    <div style="position:relative" class="container radial">
        <a style="position:absolute;top:15px;right:15px;color:black" href=""><i class='icon-off'></i>logout</a>
        <p class="text-center span6 offset3" style="font-size:32px;margin-top:30px;">
            <b style="color:green">Dict</b> Administrater Backstage
        </p>

        <br><br><br>
         
        <ul class="nav">
          

        </ul>   
<div class="navbar">
  <div class="navbar-inner">
    <ul class="nav">
        <li>
            <a href="../Index/index">用户管理</a>
        </li>
        <li>
            <a href="../Circle/index">圈子管理</a>
        </li>
        <li>
            <a href="../Document/index">文献管理</a>
        </li>
        <li class="active">
            <a href="../Item/index">词条管理</a>
        </li>
    </ul>
  </div>
</div>
        <div class="" id="home">
                <div style="position:relative" class="span10 offset1">
                    
                        <h2>用户列表</h2>
                        <!-- <div style="position:absolute;left:180px;top:18px;" class="btn-group">
                              <a class="btn dropdown-toggle" data-toggle="dropdown" href="#">
                                操作菜单
                                <span class="caret"></span>
                              </a>
                              <ul class="dropdown-menu">
                                <li>
                                    <a data-toggle="modal" href="#model_adduser">新增用户</a>
                                </li>
                              </ul>
                        </div> -->
                    
                    <table class="table table-bordered table-hover">
                        <thead>
                            <tr>
                                <td>词条ID</td>
                                <td>词条所属文献ID</td>
                                <td>词条创建者ID</td>
                                <td>词条名称</td>
                                <td>词条描述</td>
                                <td style="color:blue">删除用户</td>
                            </tr>                           
                        </thead>
                        <tbody>
                            <foreach name='users' item='u'>
                                <tr>
                                    <td id="{$u.u_id}">{$u.u_id}</td>
                                    <td>{$u.username}</td>
                                    <td>{$u.password}</td>
                                    <td>{$u.email}</td>
                                    <td id="{$u.status}">{$u.status}</td>
                                    <td>{$u.birthday}</td>
                                    <td>{$u.regtime}</td>
                                    <td><a  class="del"><i class="icon-remove"></i></a></td>
                                    <td><a  class="change_right"><i class="icon-wrench"></i></a></td>
                                </tr>
                            </foreach>
                        </tbody>
                        <tfoot>
                            <tr>
                                <td colspan="6" style="text-align:center">
                                    <div style="margin:0 auto;" class="pagination">
                                        <ul>
                                            <li><a href="#">Prev</a></li>
                                            <li><a href="#">1</a></li>
                                            <li><a href="#">2</a></li>
                                            <li><a href="#">3</a></li>
                                            <li><a href="#">4</a></li>
                                            <li><a href="#">5</a></li>
                                            <li><a href="#">Next</a></li>
                                        </ul>
                                    </div>
                                </td>
                            </tr>
                        </tfoot>
                    </table>
                </div>      
            </div>
<script>
    // $(function(){
    //     var dels = $('.del');
    //     dels.each(function(){
    //         $(this).click(function(){
    //             var tr = $(this)[0].parentNode.parentNode;
    //             var u_id = tr.getElementsByTagName('td')[0].getAttribute('id');
    //             debugger;
    //             var form=$("<form method='post' action=\"{:U(GROUP_NAME . '/Index/delUserHandle')}\"><input name='u_id' value="+u_id+"></form>");
    //             form.submit();
    //             tr.parentNode.removeChild(tr);
    //         })
    //     });
    //     var change_right = $('.change_right');
    //     change_right.each(function(){
    //         $(this).click(function(){
    //             var tr = $(this)[0].parentNode.parentNode;
    //             var u_id= tr.getElementsByTagName('td')[0].getAttribute('id');
    //             var s_td=$(this).parent().parent().find('td').eq(4);
    //             var status = s_td.attr('id');
    //             var form=$("<form method='post' action=\"{:U(GROUP_NAME . '/Index/updateUserStatusHandle')}\"><input name='u_id' value="+u_id+"><input name='status' value="+status+"></form>");
    //             form.submit()
    //             s_td.attr('id',s_td.attr('id')=='1'?s_td.attr('id','2'):s_td.attr('id','1'));
    //             s_td.html()=='1'?s_td.html('2'):s_td.html('1');
    //         })
    //     })
    // })    
</script>
<load href='__PUBLIC__/js/item.js'/>
<include file="Public:footer" />